<template>
  <div class="config_div">
    <el-header style="background-color: #a3eead">SDH PTP 配置</el-header>
    <el-form :model="sdh['sdh-ptp-pac']" ref="ruleForm" label-width="120px" class="config_form">
      <el-form-item label="交换能力" prop="current-working-mode">
        <el-select v-model="sdh['sdh-ptp-pac']['switch-capability']" multiple readonly>
          <el-option
              v-for="(i,index) in sdh_switchType"
              :key="index"
              :value="i">
          </el-option>
        </el-select>
      </el-form-item>

      <el-form-item label="信号类型" prop="current-working-mode">
        <el-select v-model="sdh['sdh-ptp-pac']['sdh-signal-type']" clearable
                   placeholder="请选择信号类型">
          <el-option
              v-for="(i,index) in sdh_clientSignalType"
              :key="index"
              :value="i">
          </el-option>
        </el-select>
      </el-form-item>

      <el-form-item label="J0实际发送开销" prop="current-mtu">
        <el-input v-model="sdh['sdh-ptp-pac']['j0-actual-tx']" placeholder="16进制"></el-input>
      </el-form-item>
      <el-form-item label="J0期望接收开销" prop="mac-address">
        <el-input v-model="sdh['sdh-ptp-pac']['j0-expected-rx']" placeholder="16进制"></el-input>
      </el-form-item>
      <el-form-item label="J0实际接收开销" prop="lldp-enable">
        <el-input v-model="sdh['sdh-ptp-pac']['j0-trail-trace-actual-rx']" placeholder="16进制" readonly></el-input>
      </el-form-item>
      <el-form-item>
        <el-image
            style="width: 20px; height: 25px;"
            :src="require('@/assets/union_rule_font.jpg')"
            :preview-src-list="[require('@/assets/union/sdhPtp.jpg')]">
        </el-image>
        <el-button type="primary" @click="submitForm('ruleForm')">确认</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "SdhPtp",
  data(){
    return{
      //SDH信号类型
      sdh_clientSignalType: ['STM1', 'STM4', 'STM16', 'STM64', 'STM256'],
      //该端口支持的交换能力
      sdh_switchType: ['VC3', 'VC4', 'VC12'],

      sdh:{
        "sdh-ptp-pac": {
          "supported-sdh-signal-type":'',
          "sdh-signal-type": "STM4",
          "switch-capability":['VC3','VC4'],
          "j0-actual-tx": "000000000000000000000000000000",
          "j0-expected-rx": "000000000000000000000000000000",
          "j0-trail-trace-actual-rx":'',
        }
      },
      getSdh:{
        "sdh-ptp-pac": {
          "supported-sdh-signal-type":'',
          "sdh-signal-type": "STM4",
          "switch-capability":['VC3','VC4'],
          "j0-actual-tx": "000000000000000000000000000000",
          "j0-expected-rx": "000000000000000000000000000000",
          "j0-trail-trace-actual-rx":'',
        }
      }
    }
  }
}
</script>

<style scoped>

</style>